﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Norm;
using NormActiveRecord;

namespace Kazuku.Core.Models {
	public class PageModule : ActiveRecordEntity<PageModule> {
		public ObjectId ID { get; set; }
		public string Area { get; set; }	// Area (i.e. "News")
		public string Controller { get; set; } // Controller ("News" or a subcontroller within News)
		public string Action { get; set; }	// an action on that controller (i.e. "ShortList")
		private Dictionary<string, string> _parameters = new Dictionary<string, string>();
		public Dictionary<string, string> Parameters { // Name-Value parameters to pass to the action
			get { return _parameters; }
			set { _parameters = value; }
		}	
		public string Title { get; set; }	// The title to display in the Module header (i.e. "Latest News")
		public string Template { get; set; }	// The template to use for display (use SparkViewEngine)
		public string Location { get; set; }	// The content location in the template where this module will be displayed (i.e. "Left", "Center", "Right")
		public int Order { get; set; }		// The order of appearance within that location
		public string Container { get; set; }	// The container template to use
		public ObjectId ItemID { get; set; }	// A data item ID (e.g. ID of a News item, a blog post, a product, etc) - might not need this with the flexibility of "Parameters"
		//public string HeaderImage { get; set; }

		public PageModule(IModelFactory modelFactory) : base(modelFactory) { }
	}
}
